﻿using System;
using Autodesk.Revit.DB;
using Autodesk.Revit.DB.Architecture;
using YArchitech.Revit;

namespace FetchDataCompare
{
	internal class GeoStairsStruct : GeoObjectStructBase, IGeoObjectStruct
	{
		public GeoStairsStruct(Element element, Autodesk.Revit.DB.View view) : base(element, view)
		{
			base.Attribute = this.GetElementAttribute();
		}

		public GeoStairsStruct()
		{
		}

		public override string GetElementAttribute()
		{
			string elementAttribute = base.GetElementAttribute();
			this.GetExtendAttribute(ref elementAttribute);
			return elementAttribute;
		}

		public void GetExtendAttribute(ref string attr)
		{
			Stairs stairs = base.UseElement as Stairs;
			if (stairs == null)
			{
				attr = (attr ?? "");
				return;
			}
			string text = stairs.BaseElevation.ToString("f2");
			string text2 = stairs.TopElevation.ToString("f2");
			attr = string.Concat(new string[]
			{
				attr,
				text,
				";",
				text2,
				";"
			});
			string str = (base.UseDoc.GetElement(stairs.GetTypeId()) as StairsType).GetParameter(BuiltInParameter.STAIRSTYPE_MINIMUM_RUN_WIDTH).AsDouble().ToString("f2");
			attr = attr + str + ";";
		}
	}
}
